package com.yu.crm.mapper;

import com.yu.crm.domain.pojo.CrmAreaManage;
import com.yu.crm.domain.pojo.CrmBuilding;
import com.yu.crm.domain.pojo.CrmDevice;
import com.yu.crm.domain.pojo.CrmEarlyWarningDiscernArea;
import com.yu.crm.domain.response.BuildingRep;
import com.yxzz.common.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author pan
 * @since 2020-07-01
 */
public interface CrmEarlyWarningDiscernAreaMapper extends BaseMapper<CrmEarlyWarningDiscernArea> {
    List<CrmAreaManage>  getAllArea(String userId);
    List<CrmBuilding> getBuildingByAreaManagerId(Long areaManageId);
    List<CrmDevice> getAllDeviceByAreaBuildingId(@Param("areaBuildingId")Long areaBuildingId,@Param("areaBuildingType") String areaBuildingType);
    List<CrmDevice> getAllDevice(String type);
    BuildingRep getLocationByDeviceId(@Param("deviceId") Long deviceId, @Param("areaBuildingType") String areaBuildingType);
    CrmAreaManage getAreaManageByBuildingId(Long buildingId);
}
